package com.fili.core.serial;

import java.util.ArrayList;

/**
 * Created by Claudiu-Florin FILIMON
 * Date: Oct 14, 2006
 * Time: 11:51:44 AM
 */
public class SerialParser
{
    private ArrayList<SerialConsumer> consumers;

    public SerialParser()
    {
    }


    public SerialParser(SerialConsumer[] cons)
    {
        for (SerialConsumer sc : cons)
            addConsumer(sc);
    }

    public void addConsumer(SerialConsumer consumer)
    {
        if (consumers.indexOf(consumer) < 0)
            consumers.add(consumer);
    }

    public void removeConsumer(SerialConsumer consumer)
    {
        consumers.remove(consumer);
    }

    public void receiveSerialData(String s)
    {

    }
}
